package com.xuecheng.content.service;

import com.xuecheng.commons.model.dto.CourseAuditDto;
import com.xuecheng.commons.model.dto.CourseBaseDto;
import com.xuecheng.commons.model.dto.CourseDto;
import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.content.domain.CourseBase;
import com.baomidou.mybatisplus.extension.service.IService;
import io.minio.errors.*;

import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;

/**
 * <p>
 * 课程基本信息 服务类
 * </p>
 *
 * @author HuangYuwu
 * @since 2022-09-11
 */
public interface CourseBaseService extends IService<CourseBase> {
    /**
     * 课程信息分页查询
     * @param request
     * @param dto
     * @return
     */
    ResponseResult findByPage(PageRequest request, CourseDto dto);

    /**
     * 课程信息新增
     * @param courseBaseDto
     * @return
     */
    ResponseResult saveCourseBase(CourseBaseDto courseBaseDto);

    /**
     * 修改课程信息
     * @param dto
     * @return
     */
    ResponseResult updateCourseBase(CourseBaseDto dto);

    /**
     * 根据课程id删除课程
     * @param courseId
     * @return
     */
    ResponseResult deleteCourseBaseById(Long courseId) throws ServerException, InvalidBucketNameException, InsufficientDataException, ErrorResponseException, IOException, NoSuchAlgorithmException, InvalidKeyException, InvalidResponseException, XmlParserException, InternalException;

    /**
     * 机构提交课程审核
     * @param courseBaseId
     * @return
     */
    ResponseResult commitCourseBase(Long courseBaseId);

    /**
     * 管理员审核课程
     * @param courseAuditDto
     * @return
     */
    ResponseResult approveCourseBase(CourseAuditDto courseAuditDto);
}
